package cn.jhc.servlet;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import cn.jhc.bean.UserBean;
import cn.jhc.dao.ShopDAO;
@WebServlet("/houtaideletelist.do")
public class Houtai_DeleteListServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
		throws ServletException, IOException {
	String id=req.getParameter("id");
	int Id= Integer.parseInt(id);
	String date=req.getParameter("date");
	String time=req.getParameter("time");
	String datetime=date+" "+time;
	ShopDAO dao=null;
		dao=new ShopDAO();
		try{
		dao.Admindeletelist(Id,datetime);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		req.setAttribute("date", datetime);
	RequestDispatcher dispatcher = req.getRequestDispatcher("/adminchecklist.jsp?Page=1&judgment=F&judgment2=T");
	dispatcher.forward(req, resp);
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
		throws ServletException, IOException {
	doPost(req, resp);
}
}
